Backtracking Support in Code Editing
نویسنده
چکیده
Programmers often need to backtrack while coding. Here, “backtracking” refers to when programmers go back at least partially to an earlier state of code, either by removing inserted code or by restoring removed code. For example, when some newly added feature does not work as imagined, the programmer might have to backtrack and try something else. When learning an unfamiliar API, programmers often need to try some sequence of object instantiation and method calls, run the program, and backtrack if the result is not as expected. I conducted a series of three empirical studies in order to better understand the backtracking behavior of programmers. The results indicated that backtracking is prevalent in programming, and programmers often face challenges when backtracking. For example, they had difficulties when trying to find all the relevant parts of code to be backtracked or when trying to restore some code they had deleted that later turned out to be needed. However, programmers only have very limited support for backtracking in today’s tools. The linear undo command can only undo the most recent changes, and loses the undone changes as soon as the programmer makes a single new change after invoking the undo command. Version control systems such as Subversion and Git can also be used for backtracking, but only when the desired code is already committed in the repository. Furthermore, the results from the empirical studies showed that 38% of all the backtrackings are done manually without any tool support and 9.5% are selective, which means that they could not have been performed using the conventional undo command. To help programmers backtrack more easily and accurately, I devised a novel selective undo mechanism for code editors, and implemented it in an IDE plug-in called AZURITE. The core idea is to combine the following mechanisms into a coherent programming tool: a selective undo mechanism for code editors, novel visualizations of the coding history, and a code change history search. AZURITE retains the full fine-grained code change history, and the selective undo mechanism allows users to select and undo one or more isolated edit operations, while appropriately detecting and handling conflicting operations. The visualizations and history search are the user interfaces that help users to select the desired edit operations to be backtracked and express what they remember about the code changes that they want to revert. In a controlled lab experiment, programmers using AZURITE performed twice as fast compared to the control group when completing typical backtracking tasks. My hope is that this selective undo tool will help programmers achieve their daily programming tasks more effectively.
منابع مشابه
A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs
Backtracking (i.e., reverse execution) helps the user of a debugger to naturally think backwards along the execution path of a program, and thinking backwards makes it easy to locate the origin of a bug. So far backtracking has been implemented mostly by state saving or by checkpointing. These implementations, however, inherently do not scale. Meanwhile, a more recent backtracking method based ...
متن کاملCollaborative Output Tasks and their Effects on Learning English Comparative Adjectives
This study aimed to examine the effect of two types of collaborative output tasks on Iranian EFL learners’ comparative adjectives with two or more syllables. Thirty Iranian EFL learners participated in this study which were then divided into two experimental and one control groups; one experimental group received dictogloss task in 4-pairs and the other experimental group was given text reconst...
متن کاملFast Protein Structure Alignment Algorithm Based on Local Geometric Similarity
This paper proposes a novel fast protein structure alignment algorithm and its application. Because it is known that the functions of protein are derived from its structure, the method of measuring the structural similarities between two proteins can be used to infer their functional closeness. In this paper, we propose a 3D chain code representation for fast measuring the local geometric simil...
متن کاملBanshee: A Scalable Constraint-Based Analysis Toolkit
We introduceBanshee, a toolkit for constructing constraintbased analyses. Banshee’s novel features include a code generator for creating customized constraint resolution engines, incremental analysis based on backtracking, and fast persistence. These features make Banshee useful as a foundation for production program analyses.
متن کاملTiger - An Interpreter Generation Tool
Tiger (Trinity Interpreter GEneratoR) is a new interpreter generator tool along the lines of vmgen, but with significant improvements in flexibility and feedback. Support for important new features such as instruction specialisation, replication and improved analysis of code at runtime are presented. A simple ‘C’ virtual machine imported into Tiger is used for demonstration purposes. Various re...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015